//
// Created by tang on 23-4-1.
//

#ifndef XXT_BUS_PLUGIN_HPP
#define XXT_BUS_PLUGIN_HPP

#include <plugin/plugin_interface.hpp>
#include <service/cfg_service.hpp>
#include <service/http_service.hpp>
#include <utils/safe_value.hpp>
#include "xxt_bus_data.hpp"

class ImageContent;

class XxtBusPlugin final : public IPlugin
{
public:
    const PluginInfo   *get_plugin_info () const override;
    bool                initialize () override;
    void                tick (pi_time_t delta, pi_time_t total) override;
    void                cleanup () override;
    const char         *name () const override;
    const ImageContent *icon () const override;
    ui_view            *content () const override;

private:
    ImageContent *icon_;
    ui_view      *view_;

    XxtBusData data_;
};

#endif  // XXT_BUS_PLUGIN_HPP
